package com.wang.mapper;

import com.wang.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    // 查询所有用户
    List<User>  findAll();

    // 根据id 查询用户
    User findById(@Param("id")Integer id);

    Integer addUser(User user);

    /**
     * @param
     * @return
     * @description  用户登录
     * @author admin
     * @updateTime 2025/2/26 18:55
     */

    User findByUsername(@Param("username")String username);
}
